package threelayer.dao.impl;


import threelayer.bean.User;
import threelayer.dao.UserDao;

/**
 * Created by Myth on 1/22/2017.
 */
public class UserDaoImpl implements UserDao {
    @Override
    public User queryUser(User user) {
        //假设是从数据库中查询的
        if ("123".equals(user.getUsername())
                && "pswd".equals(user.getPassword())) {
            user.setName("蔡鹏博"); //从数据库中得到了姓名
            return user;
        } else {
            return null;
        }
    }
    @Override
    public void addUser(User user) {

    }

    @Override
    public void deleteUser(User user) {

    }


    @Override
    public boolean updateUser(User user) {
        return false;
    }
}
